import 'package:dartkit/dartkit.dart';
import 'package:test/test.dart';

void main() {
  test("序列化和反序列化", () {
    final diary =
        Diary(id: 1, date: Date.now(), title: "title", content: "content");
    final recover = Diary.fromRaw(diary.toJson());
    expect(diary.id, recover.id);
    expect(diary.content, recover.content);
    expect(diary.title, recover.title);
    expect(diary.date, recover.date);
  });
}
